#pragma once

#include <string>
#include <map>
#include <memory>

#include <uv.h>

#include "server_base.h"
#include "dispatcher.h"

namespace anb { namespace net {

class server : public server_base {
public:
    server(loop::ptr loop, dispatcher::ptr dispatcher);
    virtual ~server();

    virtual void stop();

protected:
	virtual void connection_stopped(connection_base* connection);
	virtual connection_base* create_connection(uv_tcp_t* tcp);

private:
	dispatcher::ptr m_dispatcher;
};


} }